//
//  OnlineTabBarController.m
//  iBaby365v2
//
//  Created by admin on 14/12/2.
//  Copyright (c) 2014年 suplus. All rights reserved.
//

#import "OnlineTabBarController.h"
#import "OnlineTabBar.h"
#import "OnlineTabBarButton.h"

@interface OnlineTabBarController ()

@end

@implementation OnlineTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
//   [self.tabBarController.tabBar setSelectedImageTintColor:[UIColor greenColor]];
    [[UITabBar appearance] setTintColor:[UIColor orangeColor]];
//    UIImage *image = [UIImage imageNamed:@"jz_tab_yuerzixun_up"];
//    
//    UIImageView *imageview = [[UIImageView alloc]initWithImage:image];
//    imageview.frame = CGRectMake(0, 0, 60, 60);
   //    [[UITabBar appearance] setBarTintColor:[UIColor yellowColor]];
    //    1.移除系统自带的tabBar
//        [self.tabBar removeFromSuperview];
//    OnlineTabBar *myTabBar = [[OnlineTabBar alloc]init];
//    myTabBar.delegate = self;
//    myTabBar.frame = self.tabBar.bounds;
//    
//    NSLog(@"tab大小---%f",myTabBar.frame.size.height);
//    [self.tabBar addSubview:myTabBar];
//    
////    for (int i=0; i<self.viewControllers.count; i++) {
//        NSString *yuerName = [NSString stringWithFormat:@"jz_tab_yuerzixun_up"];
//        NSString *selyuerName = [NSString stringWithFormat:@"jz_tab_yuerzixun_down"];
//        [myTabBar addTabButtonWithName:yuerName selName:selyuerName titleName:@"育儿教育"];
//        NSString *zjName = [NSString stringWithFormat:@"jz_tab_zhuanjiaketang_up"];
//        NSString *selzjName = [NSString stringWithFormat:@"jz_tab_zhuanjiaketang_down"];
//        [myTabBar addTabButtonWithName:zjName selName:selzjName titleName:@"专家课堂"];
//    }
}

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
//    删除系统自动生成的UITabBarButton
//    for (UIView *child in self.tabBar.subviews) {
//        NSLog(@"===child=%@",child);
//        for (int i=0; i<child.subviews.count; i++) {
//            if (i==0) {
//                
//                UIImageView *imgView=child.subviews[i];
//                NSLog(@"===imgView=%@",imgView);
//                imgView.frame = CGRectMake(0, 0, 30, 30);
//            }
//        }
//        if ([child isKindOfClass:[UIControl class]]) {
////            [child removeFromSuperview];
//            shild.s
//        }
//    }
}

//#pragma mark - OnlineTabBar的代理方法
//-(void)tabBar:(OnlineTabBar *)tabBar didselectButtonFrom:(int)from to:(int)to
//{
//    self.selectedIndex = to;
//}
//-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
//{
//    
//}

@end
